package com.itheima.marking_system.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.itheima.marking_system.mapper.PictureMapper;
import com.itheima.marking_system.pojo.entity.PictureEntity;
import com.itheima.marking_system.service.PictureService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PictureServiceImpl extends ServiceImpl<PictureMapper, PictureEntity> implements PictureService {

    @Override
    public List<PictureEntity> getPictureList(Long templateId) {
        LambdaQueryWrapper<PictureEntity> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(PictureEntity::getZipId, templateId);

        return this.list(queryWrapper);
    }
}

